package com.homwee.serialportinspection.tv;

import android.bluetooth.BluetoothDevice;
import android.net.wifi.ScanResult;

import com.homwee.serialportinspection.model.Types;

import java.util.List;

public interface Tv {
    String ACTION_SHOW = "com.homwee.serialportinspection.ACTION_SHOW"; // show below content
    int CONTENT_VIDEO = 0;
    int CONTENT_PATTERN = 1;
    int CONTENT_CT_VALUE = 2;

    interface ResultListener {
        void onWifiScanResult(List<ScanResult> results);

        void onBtDiscoveryResult(BluetoothDevice bt);
    }

    void UninitAntv();

    boolean powerOff();

    boolean standby();

    boolean setInputSource(Types.InputSource inputSource);

    int getInputSource();

    boolean playChannel(Types.ChannelType channelType, int channelNum);

    boolean getCurrChannel(int[] channel);   // channel[0] is type, channel[1] is num

    boolean setVolume(int volume);

    int getVolume();

    boolean setSpdifMode(Types.SpdifMode mode);

    int getSpdifMode();

    boolean setPictureMode(Types.PictureMode mode);

    int getPictureMode();

    boolean setMModeEnable(boolean isEnable);

    boolean isMMode();

    boolean enterFactoryMenu();

    boolean exitFactoryMenu();

    boolean factoryReset();

    boolean setBacklight(int backlight);

    int getBacklight();

    boolean setContrast(int contrast);

    int getContrast();

    String getSwVersion();

    boolean resetWB();  // WB: white balance

    boolean setWB(Types.ColorPart part, int value); // WB: white balance

     boolean factorySetWB(int ctMode ,Types.FactoryColorTempData ctData);

    int getWB(Types.ColorPart part);    // WB: white balance

    boolean setCtMode(Types.ColorTempMode mode);    // CT: color temperature

    int getCtMode();    // CT: color temperature

    boolean showCtValue();

    boolean hideCtValue();

    boolean showPattern(int color); // argb

    boolean closePattern();

    boolean factorySetWB(Types.InputSource source, Types.ColorTempMode mode, Types.FactoryColorTempData ctData);

    boolean factorySetWB(Types.FactoryColorTempData ctData);  // current source and CT mode

    boolean factorySetWB(Types.ColorTempMode mode, Types.ColorPart part, int gain);

    Types.FactoryColorTempData factoryGetWB(Types.InputSource source, Types.ColorTempMode mode);    // return null if error

    Types.FactoryColorTempData factoryGetWB();  // current source and CT mode

    int factoryGetWB(Types.ColorTempMode mode, Types.ColorPart part);

    boolean factoryWbPattern(int percent, boolean isEnable);

    boolean hideUI();

    boolean setSoundMode(Types.SoundMode mode);

    int getSoundMode();

    boolean setMute(boolean isMute);

    boolean isMute();

    int getUsbStorageCnt();

    boolean setEthMac(String mac);

    String getEthMac();

    String getEthIp();

    String getWifiMac();

    boolean setWifiEnable(boolean isEnable);

    boolean isWifiEnable();

    List<ScanResult> getWifiScanResult();

    int wifiScan(); // -2: busy, -1: error, 0: ok

    void unRegisterWifiReceiver();

    String getBtVersion();  // BT: blue tooth

    String getBtMac();

    boolean startBtDiscovery(String ap);    // if ap is not null nor empty, only discovery ap

    BluetoothDevice getBtDiscoveryDev();

    String[] getBtConnectedDev();

    String getSerialNumber();

    boolean setBalance(Types.Balance balance);

    int  getBalance();

    boolean sendKeyEvent(int keyCode);

    boolean setScreenSaverTime(int minutes);

    int getScreenSaverTime();

    boolean setNoOperSleepTime(int minutes);

    int getNoOperSleepTime();

    boolean setNoSignalPowerOffTime(int minutes);

    int getNoSignalPowerOffTime();

    boolean registerResultListener(ResultListener listener);

    boolean unregisterResultListener(ResultListener listener);

    String getProjectID();

    String getPQVersion();

    String getAQVersion();

    String getPanelVersion();

    String getDataVersion();

    String getBuildTime();

    String getPanelName();

    boolean getHDCPKey10();

    boolean getHDCPKey2();

    boolean getWideVineKey();

    boolean getKeystatusPlayready();

    boolean getKeystatusPlayready25();

    boolean getKeymaster();
	
	boolean setWBConnet();

	boolean setConnet();

	int getCECStatus();

	int setCECStatus(int cecStatus);

	int presetChannel(int type);
}
